home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / rsxwdk2s.zip / RSXWDK / LIBSRC / DOS / DOS5701.C < prev    next >
C/C++ Source or Header  |  1994-12-17  |  446b  |  28 lines

  1. #include <errno.h>
  2. #include <sys/doscalls.h>
  3.  
  4.  
  5. /*
  6. ** AX = 0x5701
  7. ** BX = handle
  8. ** CX:DX = time/date
  9. */
  10. int dos_setftime(int handle, unsigned short date, unsigned short time)
  11. {
  12.     struct REGPACK r;
  13.  
  14.     r.eax = 0x5701;
  15.     r.ebx = handle;
  16.     r.ecx = time;
  17.     r.edx = date;
  18.  
  19.     _intr(0x21, &r);
  20.  
  21.     if (r.eflags & 1) {
  22.     _sys_doserror2errno( r.eax & 0xFFFF);
  23.     return (-1);
  24.     }
  25.     else
  26.     return (r.eax & 0xFFFF);
  27. }
  28.